package com.psbc.redislock.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;
    private String message;

    public String isName(){
        return "123";
    }
    public boolean isSuccess(){
        return true;
    }
    public static Result OK() {
        return OK("ok");
    }

    public static Result OK(String message) {
        return new Result(200, message);
    }

    public static Result NO() {
        return NO("NO");
    }

    public static Result NO(String message) {
        return new Result(500, message);
    }
}
